Drop gtk_grab_add/remove from public api
authorMatthias Clasen <mclasen@redhat.com>
Fri, 28 Feb 2020 21:36:17 +0000 (16:36 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 28 Feb 2020 21:36:17 +0000 (16:36 -0500)
The only form in which we still allow grabs to take place
is with modal toplevels.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkmain.h
gtk/gtkprivate.h
gtk/gtkwindowgroup.c
gtk/gtkwindowgroup.h

index 9f6d0081b9ff4ebe2b112141da747b83a29cdf80..008ab81f1eb04f307ff8009600a42484fe46ddc5 100644 (file)
@@ -4368,7 +4368,7 @@ gtk_window_group_new
 gtk_window_group_add_window
 gtk_window_group_remove_window
 gtk_window_group_list_windows
-gtk_window_group_get_current_grab
+
 <SUBSECTION Standard>
 GTK_IS_WINDOW_GROUP
 GTK_IS_WINDOW_GROUP_CLASS
@@ -4390,10 +4390,6 @@ gtk_get_locale_direction
 gtk_init
 gtk_init_check
 
-<SUBSECTION>
-gtk_grab_add
-gtk_grab_remove
-
 <SUBSECTION>
 GTK_PRIORITY_RESIZE
 
index 72adbb69eced9284f6c66628f338c382875c16a2..16fb5743d53a7140067eb4683714a36f09accd5a 100644 (file)
@@ -107,11 +107,6 @@ PangoLanguage *gtk_get_default_language (void);
 GDK_AVAILABLE_IN_ALL
 GtkTextDirection gtk_get_locale_direction (void);
 
-GDK_AVAILABLE_IN_ALL
-void       gtk_grab_add            (GtkWidget          *widget);
-GDK_AVAILABLE_IN_ALL
-void       gtk_grab_remove         (GtkWidget          *widget);
-
 GDK_AVAILABLE_IN_ALL
 GdkEvent * gtk_get_current_event        (void);
 GDK_AVAILABLE_IN_ALL
index 9e4e73a11fd20f1eb30603da284570931622423b..6cac03c76308231dd6c30cc511ac50c186e172c7 100644 (file)
@@ -32,6 +32,7 @@
 #include "gtkcsstypesprivate.h"
 #include "gtktexthandleprivate.h"
 #include "gtkeventcontrollerprivate.h"
+#include "gtkwindowgroup.h"
 
 G_BEGIN_DECLS
 
@@ -67,6 +68,10 @@ void          _gtk_ensure_resources       (void);
 
 void          gtk_main_sync               (void);
 
+GtkWidget *   gtk_window_group_get_current_grab (GtkWindowGroup *window_group);
+void          gtk_grab_add                      (GtkWidget      *widget);
+void          gtk_grab_remove                   (GtkWidget      *widget);
+
 gboolean _gtk_boolean_handled_accumulator (GSignalInvocationHint *ihint,
                                            GValue                *return_accu,
                                            const GValue          *handler_return,
index aeadd467af20b4d063c48c87281fd68fff01fc69..4b1e0c2e3929c0970404a50f688c25c955fbdf89 100644 (file)
@@ -27,6 +27,7 @@
 #include "gtkmain.h"
 #include "gtkwindowprivate.h"
 #include "gtkwindowgroup.h"
+#include "gtkprivate.h"
 
 
 /**
@@ -81,8 +82,10 @@ gtk_window_group_class_init (GtkWindowGroupClass *klass)
 /**
  * gtk_window_group_new:
  * 
- * Creates a new #GtkWindowGroup object. Grabs added with
- * gtk_grab_add() only affect windows within the same #GtkWindowGroup.
+ * Creates a new #GtkWindowGroup object.
+ *
+ * Modality of windows only affects windows
+ * within the same #GtkWindowGroup.
  * 
  * Returns: a new #GtkWindowGroup. 
  **/
@@ -208,15 +211,6 @@ gtk_window_group_list_windows (GtkWindowGroup *window_group)
   return g_list_reverse (group_windows);
 }
 
-/**
- * gtk_window_group_get_current_grab:
- * @window_group: a #GtkWindowGroup
- *
- * Gets the current grab widget of the given group,
- * see gtk_grab_add().
- *
- * Returns: (transfer none): the current grab widget of the group
- */
 GtkWidget *
 gtk_window_group_get_current_grab (GtkWindowGroup *window_group)
 {
index 80910751ea8d10b4379c106664e2cf307037af10..b8e9ad548accf9a26b716624fc2497eefe392961 100644 (file)
@@ -76,9 +76,6 @@ void             gtk_window_group_remove_window (GtkWindowGroup     *window_grou
 GDK_AVAILABLE_IN_ALL
 GList *          gtk_window_group_list_windows  (GtkWindowGroup     *window_group);
 
-GDK_AVAILABLE_IN_ALL
-GtkWidget *      gtk_window_group_get_current_grab (GtkWindowGroup *window_group);
-
 
 G_END_DECLS